/**
 * @param {number} num
 * @return {number}
 */
var translateNum = function (num) {
  const str = num.toString()
  const n = str.length
  let prev = 1
  let cur = 1
  for (let i = 2; i < n + 1; i++) {
    const temp = Number(str[i - 2] + str[i - 1])
    if (temp >= 10 && temp <= 25) {
      let t = cur // 缓存上个状态
      cur = prev + cur // 当前状态=上上个状态+上个状态
      prev = t //更新上上个状态
    } else {
      // cur = cur
      prev = cur // 更新上上个状态
    }
  }
  return cur

};